package tool.zyk.utils;

import tool.zyk.exceptions.AssertsException;

import java.util.Objects;

/**
 * author: zyk
 * datetime: 2024/1/28 13:43
 * describe:
 */
public class Asserts {

    public static void asTrue(boolean condition, String message) {
        if (condition) return;
        throw new AssertsException(message);
    }

    public static void isNotNull(Object obj, String message) {
        if (Objects.isNull(obj)) throw new AssertsException(message);
    }
}
